package com.bipbip.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.bipbip.modelo.MarcaVehiculo;
import com.bipbip.modelo.Vehiculo;
import com.bipbip.repositorio.MarcaDAO;

@Service
public class MarcaServiceImpl implements MarcaService {

	@Autowired
	private MarcaDAO marcaDao;

	public List<MarcaVehiculo> getAll() {
		return marcaDao.selectAll();
	}

	public MarcaVehiculo getMarca(Vehiculo vehiculo) {
		return marcaDao.select(vehiculo.getIdMarca());
	}

	public MarcaVehiculo getMarcaById(Integer id) {
		return marcaDao.select(id);
	}

}
